package cn.com.shopec.erp.multiChannel.service;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

import cn.com.shopec.erp.common.page.PageFinder;
import cn.com.shopec.erp.common.page.PageQuery;
import cn.com.shopec.erp.multiChannel.entity.ChannelOrder;
import cn.com.shopec.erp.multiChannel.entity.ChannelOrderItem;
import cn.com.shopec.erp.multiChannel.entity.ChannelOrderReceiver;
import cn.com.shopec.erp.multiChannel.entity.ProductPackage;
import cn.com.shopec.erp.multiChannel.vo.ChannelOrderVo;
import cn.com.shopec.erp.purchase.vo.PurchaseRequisitionProductVo;
import cn.com.shopec.erp.purchase.vo.PurchaseReturnOrderVo;
import net.sf.json.JSONArray;

public interface IChannelOrderService {

	public PageFinder<ChannelOrder> channelOrderPageList(ChannelOrderVo channelOrderVo, PageQuery pageQuery) throws ParseException;

	public PageFinder<ChannelOrderItem> channelOrderItemPageList(ChannelOrderVo channelOrderVo, PageQuery pageQuery);

	public ChannelOrderReceiver getChannelOrderReceiver(String channelOrderId);
	
	public ChannelOrder getChannelOrder(String id);

	public PageFinder<Map<String, Object>> productPackagePageList(ChannelOrderVo channelOrderVo, PageQuery pageQuery);

	public String createProductPackage(ChannelOrderVo channelOrderVo);

	public PageFinder productPackageItemPageList(ChannelOrderVo channelOrderVo, PageQuery pageQuery);

	public String updateProductPactkageState(String prodPackageNo, int state) throws Exception;

	public ProductPackage getProductPackage(String channelOrderId);

	public String updateProductPackageReturnState(String channelOrderId, String returnState) throws Exception;

	public PageFinder returnOrderItemPageList(ChannelOrderVo channelOrderVo, PageQuery pageQuery);

	public String updateOrderState(String channelOrderId, String orderState);
	
	public Boolean saveChannelOrder(JSONArray jsonArray ) throws Exception;
	
	/**
     * 
     * @Title: addPurchase
     * @Description: 单个增加多渠道信息
     * @param brandVo
     * @return
     * @throws
     * @author: Liangshunwang
     * @date: 2013-5-26下午04:17:40
     */
    public void addPurchaseReturn(List<ChannelOrderItem> purchase,ChannelOrderReceiver channelOrderReceiver,ChannelOrder order) throws Exception;
	
}
